import http from "@/utils/http.ts";
import {R} from "@/api/common.ts";

enum Router {
    roles = "roles"
}

export interface Role {
    id: number;
    createTime: string;
    updateTime: string;
    permissions: string[];
    rname: string;
}

export function getRoles() {
    return http<R<Role[]>>({
        url: Router.roles,
        method: 'get'
    })
}